def print_pyramid(rows):
    for i in range(1, rows + 1):
        decreasing_part = ''.join(str(x) for x in range(i, 0, -1))
        increasing_part = ''.join(str(x) for x in range(2, i + 1))
        full_row = decreasing_part + increasing_part
        leading_spaces = ' ' * (rows - i)
        print(leading_spaces + full_row)

rows = int(input())

print_pyramid(rows)